package com.codejoys.monitor.domain;

import java.util.ArrayList;
import java.util.List;

public class ChannelConfigExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ChannelConfigExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andChannelIsNull() {
            addCriterion("channel is null");
            return (Criteria) this;
        }

        public Criteria andChannelIsNotNull() {
            addCriterion("channel is not null");
            return (Criteria) this;
        }

        public Criteria andChannelEqualTo(String value) {
            addCriterion("channel =", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelNotEqualTo(String value) {
            addCriterion("channel <>", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelGreaterThan(String value) {
            addCriterion("channel >", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelGreaterThanOrEqualTo(String value) {
            addCriterion("channel >=", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelLessThan(String value) {
            addCriterion("channel <", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelLessThanOrEqualTo(String value) {
            addCriterion("channel <=", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelLike(String value) {
            addCriterion("channel like", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelNotLike(String value) {
            addCriterion("channel not like", value, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelIn(List<String> values) {
            addCriterion("channel in", values, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelNotIn(List<String> values) {
            addCriterion("channel not in", values, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelBetween(String value1, String value2) {
            addCriterion("channel between", value1, value2, "channel");
            return (Criteria) this;
        }

        public Criteria andChannelNotBetween(String value1, String value2) {
            addCriterion("channel not between", value1, value2, "channel");
            return (Criteria) this;
        }

        public Criteria andCabinetIsNull() {
            addCriterion("cabinet is null");
            return (Criteria) this;
        }

        public Criteria andCabinetIsNotNull() {
            addCriterion("cabinet is not null");
            return (Criteria) this;
        }

        public Criteria andCabinetEqualTo(String value) {
            addCriterion("cabinet =", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetNotEqualTo(String value) {
            addCriterion("cabinet <>", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetGreaterThan(String value) {
            addCriterion("cabinet >", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetGreaterThanOrEqualTo(String value) {
            addCriterion("cabinet >=", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetLessThan(String value) {
            addCriterion("cabinet <", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetLessThanOrEqualTo(String value) {
            addCriterion("cabinet <=", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetLike(String value) {
            addCriterion("cabinet like", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetNotLike(String value) {
            addCriterion("cabinet not like", value, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetIn(List<String> values) {
            addCriterion("cabinet in", values, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetNotIn(List<String> values) {
            addCriterion("cabinet not in", values, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetBetween(String value1, String value2) {
            addCriterion("cabinet between", value1, value2, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetNotBetween(String value1, String value2) {
            addCriterion("cabinet not between", value1, value2, "cabinet");
            return (Criteria) this;
        }

        public Criteria andCabinetIpIsNull() {
            addCriterion("cabinet_ip is null");
            return (Criteria) this;
        }

        public Criteria andCabinetIpIsNotNull() {
            addCriterion("cabinet_ip is not null");
            return (Criteria) this;
        }

        public Criteria andCabinetIpEqualTo(String value) {
            addCriterion("cabinet_ip =", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpNotEqualTo(String value) {
            addCriterion("cabinet_ip <>", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpGreaterThan(String value) {
            addCriterion("cabinet_ip >", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpGreaterThanOrEqualTo(String value) {
            addCriterion("cabinet_ip >=", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpLessThan(String value) {
            addCriterion("cabinet_ip <", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpLessThanOrEqualTo(String value) {
            addCriterion("cabinet_ip <=", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpLike(String value) {
            addCriterion("cabinet_ip like", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpNotLike(String value) {
            addCriterion("cabinet_ip not like", value, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpIn(List<String> values) {
            addCriterion("cabinet_ip in", values, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpNotIn(List<String> values) {
            addCriterion("cabinet_ip not in", values, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpBetween(String value1, String value2) {
            addCriterion("cabinet_ip between", value1, value2, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCabinetIpNotBetween(String value1, String value2) {
            addCriterion("cabinet_ip not between", value1, value2, "cabinetIp");
            return (Criteria) this;
        }

        public Criteria andCanIndexIsNull() {
            addCriterion("can_index is null");
            return (Criteria) this;
        }

        public Criteria andCanIndexIsNotNull() {
            addCriterion("can_index is not null");
            return (Criteria) this;
        }

        public Criteria andCanIndexEqualTo(Byte value) {
            addCriterion("can_index =", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexNotEqualTo(Byte value) {
            addCriterion("can_index <>", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexGreaterThan(Byte value) {
            addCriterion("can_index >", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexGreaterThanOrEqualTo(Byte value) {
            addCriterion("can_index >=", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexLessThan(Byte value) {
            addCriterion("can_index <", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexLessThanOrEqualTo(Byte value) {
            addCriterion("can_index <=", value, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexIn(List<Byte> values) {
            addCriterion("can_index in", values, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexNotIn(List<Byte> values) {
            addCriterion("can_index not in", values, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexBetween(Byte value1, Byte value2) {
            addCriterion("can_index between", value1, value2, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanIndexNotBetween(Byte value1, Byte value2) {
            addCriterion("can_index not between", value1, value2, "canIndex");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdIsNull() {
            addCriterion("can_module_id is null");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdIsNotNull() {
            addCriterion("can_module_id is not null");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdEqualTo(Integer value) {
            addCriterion("can_module_id =", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdNotEqualTo(Integer value) {
            addCriterion("can_module_id <>", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdGreaterThan(Integer value) {
            addCriterion("can_module_id >", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("can_module_id >=", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdLessThan(Integer value) {
            addCriterion("can_module_id <", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdLessThanOrEqualTo(Integer value) {
            addCriterion("can_module_id <=", value, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdIn(List<Integer> values) {
            addCriterion("can_module_id in", values, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdNotIn(List<Integer> values) {
            addCriterion("can_module_id not in", values, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdBetween(Integer value1, Integer value2) {
            addCriterion("can_module_id between", value1, value2, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andCanModuleIdNotBetween(Integer value1, Integer value2) {
            addCriterion("can_module_id not between", value1, value2, "canModuleId");
            return (Criteria) this;
        }

        public Criteria andModbusIndexIsNull() {
            addCriterion("modbus_index is null");
            return (Criteria) this;
        }

        public Criteria andModbusIndexIsNotNull() {
            addCriterion("modbus_index is not null");
            return (Criteria) this;
        }

        public Criteria andModbusIndexEqualTo(Integer value) {
            addCriterion("modbus_index =", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexNotEqualTo(Integer value) {
            addCriterion("modbus_index <>", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexGreaterThan(Integer value) {
            addCriterion("modbus_index >", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexGreaterThanOrEqualTo(Integer value) {
            addCriterion("modbus_index >=", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexLessThan(Integer value) {
            addCriterion("modbus_index <", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexLessThanOrEqualTo(Integer value) {
            addCriterion("modbus_index <=", value, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexIn(List<Integer> values) {
            addCriterion("modbus_index in", values, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexNotIn(List<Integer> values) {
            addCriterion("modbus_index not in", values, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexBetween(Integer value1, Integer value2) {
            addCriterion("modbus_index between", value1, value2, "modbusIndex");
            return (Criteria) this;
        }

        public Criteria andModbusIndexNotBetween(Integer value1, Integer value2) {
            addCriterion("modbus_index not between", value1, value2, "modbusIndex");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}